<template>
  <ContentWrap :style="{ border: 'none' }">
    <div :class="['relative overflow-hidden']" :style="{ height: height + 'px' }">
      <IFrame
        :src="src"
        :style="{
          width: `calc(100% + ${iframeCrop ? menuWidth : '0px'})`,
          height: `calc(100% + ${iframeCrop ? headHeight : '0px'})`,
          transform: `translate(-${iframeCrop ? menuWidth : '0px'},-${
            iframeCrop ? headHeight : '0px'
          })`
        }"
      />
    </div>
  </ContentWrap>
</template>
<script lang="ts" setup>
import { computed } from 'vue'
import { useAppStore } from '@/store/modules/app'

defineOptions({ name: 'Qwl' })
const appStore = useAppStore()
const iframeCrop = computed(() => appStore.getIframeCrop)
const height = ref(document.documentElement.clientHeight - 206)
const menuWidth = ref('210px')
const headHeight = ref('80px')
const { name } = useRoute() // 路由信息
const src = name
</script>
